package com.bishe.dao.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bishe.domain.Users;
import com.bishe.sevice.UsersSevice;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
public class UsersServiceTestCase {

    @Autowired
    private UsersSevice usersSevice;
    @Test
    void testGetById(){
        System.out.println(usersSevice.getById(2));
    }

    @Test
    void testGetAll(){
        usersSevice.getAll();
    }

    @Test
    void testDelete(){
        usersSevice.delete(5);
    }

    @Test
    void testSave(){
        Users users = new Users();
        users.setUid("100");
        users.setPassword("100");
        users.setJudge(1);
        usersSevice.save(users);
    }

    @Test
    void testUpdate(){
        Users users = new Users();
        users.setId(5);
        users.setPassword("200");
        usersSevice.update(users);
    }

    @Test
    void testGetPage(){
        usersSevice.getPage(2,2);
    }

    @Test
    void testGetBy(){
        usersSevice.getBy(5);
    }

}
